package Exception.Throwable;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/9/18 10:22
 * @description:
 * @version:
 */
public class Test {
    public static void main(String[] args) {
        try {
            test();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void test() throws Exception{
        int i = 9;
        int j = 0;
        int a = 1;
        Integer a1 = 1;
        System.out.println(a == a1);
        int b = 1211;
        Integer b1 = 1211;
        System.out.println(b == b1);
        Integer c = 199;
        Integer c1 = 199;
        System.out.println(c == c1);

        int k = i / j;
    }

    public static int divide(int dividend, int divisor) {
        if (divisor == 0) {
            // 抛出自定义异常，指示除数为零的错误
            throw new ArithmeticException("除数不能为零");
        }
        return dividend / divisor;
    }
}
